<?php

namespace App\Notifications;

use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;

class NotifiCommon extends Notification
{
    use Queueable;

    /**
     * Create a new notification instance.
     *
     * @return void
     */
    public function __construct()
    {
        
    }

    /**
     * Get the notification's delivery channels.
     *
     * @param  mixed  $notifiable
     * @return array
     */
    public function via($notifiable)
    {
        return ['database'];
    }

    public function toDatabase($notifiable)
    {
        // 存入数据库里的数据
        return [
            'user_id' => 0,
            'title' => '充值年卡优惠',
            'content' => "凡办理年卡会员服务，将享受免2个月会员费以及免押金福利。",
            'noti_at' => date('Y-m-d H:i:s'),
        ];
    }

}
